import Vue from 'vue'
import App from './App.vue'
import Vuex from 'vuex'
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';

Vue.use(Vuex)
Vue.use(ViewUI);

Vue.config.productionTip = false

const store = new Vuex.Store({
  state: {
    content: '',
    labels: {},
    autoLabeled: []
  },
  mutations: {
    setContent(state, content) {
      state.content = content
    },
    setLabels(state, labels) {
      state.labels = labels
    },
    setAutoLabeled(state, labels) {
      state.autoLabeled = labels
    },
    changeNoun(state, noun) {
      state.labels['noun'] = noun
    },
    changeVerb(state, verb) {
      state.labels['verb'] = verb
    },
    changeAdj(state, adj) {
      state.labels['noun'] = adj
    },
  }
})

new Vue({
  render: h => h(App),
  store: store
}).$mount('#app')
